package main

import (
	"github.com/sirupsen/logrus"
	"net/http"
	"time"
	"videoThumbnail/handle"
)

func index(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(200)
}

func main() {
	http.HandleFunc("/favicon.ico", index)
	http.HandleFunc("/*", handle.Thumbnail)
	s := &http.Server{
		Addr:           ":8083",
		Handler:        nil,
		TLSConfig:      nil,
		ReadTimeout:    10 * time.Second,
		WriteTimeout:   10 * time.Second,
		IdleTimeout:    0,
		MaxHeaderBytes: 0,
		TLSNextProto:   nil,
		ConnState:      nil,
		ErrorLog:       nil,
		BaseContext:    nil,
		ConnContext:    nil,
	}

	logrus.Info("Server is starting on port 8083")
	logrus.Fatal(s.ListenAndServe())
}
